/*
 * Created by: 
 * Created: Saturday, September 09, 2006
 */

using System;

namespace TestUtils
{
	public static class Utils
	{
		public static bool AreArraysEqual(Array array1, Array array2)
		{
			if (((array1 == null) && (array2 != null)) ||
				((array2 == null) && (array1 != null)))
				return false;
			
			if (array1.Length != array2.Length)
				return false;
			for (int i = 0; i < array1.Length; i++ )
			{
				object obj1 = array1.GetValue(i);
				object obj2 = array2.GetValue(i);
				if ((obj1 == null) && (obj2 != null))
					return false;
				if (!(obj1.Equals(obj2)))
					return false;
			}
			return true;
		}
	}
}